// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 单个删除班级信息 DELETE /class/delete/${param0} */
export async function deleteClassByIdUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteClassByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Robject>(`/class/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 新增班级信息 POST /class/save */
export async function saveClassUsingPost(body: API.ClassAddDTO, options?: { [key: string]: any }) {
  return request<API.Robject>('/class/save', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 单个查询班级信息 GET /class/selectById/${param0} */
export async function selectClassByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.selectClassByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Robject>(`/class/selectById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取班主任ID和Name集合 GET /class/selectIdAndName */
export async function selectEmpIdAndNameUsingGet(options?: { [key: string]: any }) {
  return request<API.Robject>('/class/selectIdAndName', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 分页查询班级信息 GET /class/selectPage */
export async function selectClassPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.selectClassPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.Robject>('/class/selectPage', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改当前班级信息 PUT /class/update */
export async function updateClassByIdUsingPut(
  body: API.ClassEditDTO,
  options?: { [key: string]: any },
) {
  return request<API.Robject>('/class/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
